<link href="<?=SITE_URL?>css/default/ask.css" rel="stylesheet" type="text/css" />
<link href="<?=DY_URL?>../css/share/index.css" rel="stylesheet" type="text/css" />
<div class="box">
    <div class="boxone">
        <div class="boxone1">
            <div class="boxtop"><?php echo $user['username'];?></div>
            <div class="boxone1down1">
                
                <p class="boxone1down2">上传数：<strong><? echo $user["uploadNum"];?></strong></p>
                <p class="boxone1down2">回忆数：<strong><? echo $user["recallNum"];?></strong></p>
                <p class="boxone1down2">回答数：<strong><? echo $user["answerNum"];?></strong></p>
            </div>
        </div>
        <div class="blank10"></div>
        <div class="blank10"></div>	

        <div class="boxone3">
            <div class="boxone3anxian1">
                <a href="mailto:<? echo $setting['admin_email'];?>"><strong>意见反馈</strong></a>
            </div>
            <div class="boxone3anxian2">
                <a href="<? echo SITE_URL.'?index/help.html';?>"><strong>如何提问</strong></a>
            </div>
            <div class="boxone3anxian3">
                <a href="<? echo SITE_URL.'?index/help.html';?>"><strong>如何回答</strong></a>
            </div>
        </div>
    </div>

    <div class="boxtwo">
        <div class="boxtwo1">
            <div class="boxtop">
                <span><a href="<? echo DY_URL;?>recall/recall_main">更多&gt;&gt;</a></span>试卷回忆</div>
            <div class="boxtwo1down blue">
            	<table width="460px">
                <?
					for($i=1;$i<=5&&$i<=count($top['j_id']);$i++){
				?>
                <tr>
                <td width="340px"> 
                <? $top['tags'][$i-1]= $top['tags'][$i-1]? $top['tags'][$i-1]:'回忆'; ?>  
					<li><a href="<? echo base_url()."index.php/search/recall/tag/".$top['tags'][$i-1];?>">[<? echo $top['tags'][$i-1];?>]</a> <a href='<? echo DY_URL."recall/recall_main/show_record/".$top['j_id'][$i-1];?>'><? echo $top['title'][$i-1];?></a></li>
                </td>
                
                <td>
                    <li>点击数：<? echo $top['hit_cnt'][$i-1];?></li>
                </td>
                </tr>
                <? }?>        
                </table>
            </div>
        </div>

        <div class="blank10"></div>

        <div class="boxtwo1">
            <div class="boxtop blue"><span><a href="<? echo DY_URL;?>share">更多&gt;&gt;</a></span>推荐分享</div>
            <div class="boxtwo3down blue">
            	<table>
                <?
				foreach($rank as $row){
					switch($row->category){
						case 'paper':$chi='试卷';break;
						case 'textbook':$chi='教科书';break;
						case 'answer':$chi='答案';break;
						default:$chi='';
					}
				?>
                <tr>
                <td>
                
					 <li>
                    	<a href='<? echo DY_URL."share/category/show/$row->category";?>'>[<? echo $chi;?>]</a>
                    	<a href='<? echo base_url()."index.php/search/share/tag/".$row->subject;?>'>[<? echo $row->subject;?>]</a>
                        <a href='<? echo base_url()."index.php/search/share/tag/".$row->year;?>'>[<? echo $row->year;?>]</a>
                        <a href='<? echo DY_URL."share/document/preview/$row->fid";?>'><? echo $row->title;?></a>
                     </li>
                     <br>
                </td>
                <td align="right" width="80px">
				
				<li><? 
				if ($row->rank_times == 0)
				echo "评分：".$row->rank;
				else
				echo "评分：".$row->rank/$row->rank_times;?></li><br>
                			
                </td>
                
                </tr>
                <? } ?>	
                </table>
            </div>
        </div>
        <div class="blank10">
      
        </div>
        <div class="boxtwo1">
            <div class="boxtop blue"><span><a href=<? echo SITE_URL;?>?c-1.html">更多&gt;&gt;</a></span>同学正在问</div>
            <div class="boxtwo3down blue">
            	<table width="460px">
                    <?
					foreach($question as $row){
					?>
                    <tr>
						<td><li><a href='<? echo SITE_URL."?q-".$row->id.".html";?>'><? echo $row->title;?></a></li><br></td>
                        <td><li><a href='<? echo SITE_URL."?u-".$row->authorid.".html";?>'><? echo $row->author;?></a></li><br></td>
					</tr>
					<? }?>
                </table>
            </div>
        </div>
    </div>
 
    <div class="boxthree">
    	<? if($user['uid']==0){?>
        <div id="divLoginContainer">
            <div class="boxthree1">
                <a style="text-decoration: none;" href="<? echo SITE_URL.'?user/register.html';?>"><span class="login_btn">免费注册</span><br><span>免费注册拾贝</span></a>
                <a href="<? echo SITE_URL.'?user/login.html';?>" style="text-decoration: none; margin-right: 0px;"><span class="login_btn">登 录</span><br><span>开启知识之旅</span></a>
            </div>
            <div class="blank10">
            </div>
        </div>
        <? }?>
       <div class="boxthree2">
            <div class="boxtop">
                <div id="linkMore" style="font-size: 12px; font-weight: normal;" class="boxtop1_more">
                </div>和大家分享你的资料
            	</div>
            <div id="searchresult" class="boxthree2down">
               <div class="boxdown">          
                    <div class = "button_red"><a id="wanna_share" class ="link_red" href = "<?php echo site_url();?>/share/upload/form/">我要分享</a></div>
               </div>
            </div>
        </div>
        <div class="blank10">
        </div>

        <div class="blank10">
        </div>
        
        <div class="blank10">
        </div>
        <div class="boxthree4">
            <div class="boxtop2">
                <div class="boxtop2B" id="zbf021" onmouseover="show_tabz(21)">RP飙升榜</div>
                <div class="boxtop2x"></div>
                <div class="boxtop2A" id="zbf022" onmouseover="show_tabz(22)">总RP榜</div>
            </div>
            <div style="display: none;" id="zbli021">
                <table class="blue" border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td width="11%"></td>
                        <td width="68%"><strong>用户名</strong></td>
                        <td style="text-align: right;" width="21%"><strong>周RP</strong></td>
                    </tr>
                    <?php foreach($weekuserlist as $num=>$weekuser){?>
                    <tr>
                        <td><div class="boxthree4paihang1"><?php echo $num+1;?></div></td>
                        <td><a  href="<? if($weekuser['uid']!=$user['uid']) echo SITE_URL."?u-".$weekuser['uid'].".html"; else echo SITE_URL."?user/default.html";?>"  target="_blank"><? echo $weekuser['username']; ?></a><a></a></td>
                        <td class="b888" style="text-align: right;"><? echo $weekuser['credit1'];?></td>
                    </tr>
                 <? }?>
                </table>
                <div style="text-align: right; padding-right: 5px; line-height: 22px;"><a target="_blank" href="<?php echo SITE_URL;?>?us-1.html">更多&gt;&gt;</a></div>
            </div>
            <div id="zbli022" style="display: block;">
                <table class="blue" border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td width="11%">　</td>
                        <td width="68%"><strong>用户名</strong></td>
                        <td style="text-align: right;" width="21%"><strong>总RP</strong></td>
                    </tr>
                    
                    <? foreach($alluserlist as $num=>$row){?>
                    <tr>
                        <td><div class="boxthree4paihang1"><?php echo $num+1;?></div></td>
                        <td>
                        	<a  href="<? if($row['uid']!=$user['uid']) echo SITE_URL."?u-".$row['uid'].".html"; else echo SITE_URL."?user/default.html";?>"  target="_blank"><? echo $row['username'];?></a><a></a>
                            </td>
                        <td class="b888" style="text-align: right;">
                        	<? echo $row['credit1'];?>
                            </td>
                    </tr>
                    <? } ?>
                </table>
                <div style="text-align: right; padding-right: 5px; line-height: 22px;"><a target="_blank" href="<?php echo SITE_URL;?>?us-0.html">更多&gt;&gt;</a></div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>


<script type="text/javascript">
 //精彩推荐
 $("li[id^='recommend']").bind("mouseover", function(){
 	var id=$(this).attr('id') ;
	$("a[id^='recommend']").hide();
 	$('#'+id+'img').show();
}); 

//积分达人切换
function show_tabz(num){
	$("div[id^='zbf0']").attr('class','boxtop2B'); 
	$("div[id^='zbli0']").hide();
	$('#zbf0'+num).attr('class','boxtop2A'); 
	$('#zbli0'+num).show(); 
}
</script>
